MediaPipeOnDeviceLlm
Constructors
Properties
True when this backend accepts an LlmPart.Image in generate. False = text-only.
Functions
Runs prompt on-device. Returns the model's text, or null when unavailable/declined/failed.
Multimodal entry point. Default maps a single LlmPart.Text onto generate (String) so every existing text-only actual (MediaPipe, Foundation Models, jvm) keeps working with zero changes. Backends that accept images (ML Kit GenAI) override this directly.
Streaming variant of generate. Default replays the single-shot result as one emission so every existing actual keeps working with zero changes; backends with native token streaming (ML Kit GenAI) override this directly.
Cheap, synchronous floor — true only when the platform could run inference. NOT the authoritative runtime check (model residency is async); generate still guards internally.